home *** CD-ROM | disk | FTP | other *** search
- Hints and Tips
- 4.9
- • Beware spaces − There is a problem with spaces at the end of OS
- variables:
- 4.9
- If you include in a !Run file code such as the following:
- 4.9
- Set ThisApp$Dir <Obey$Dir>
- 4.9
- Run <ThisApp$Dir>.!RunImage
- 4.9
- then beware that you don’t include a space at the end of the first line!
- If you do, the space will be included in the definition of ThisApp$Dir
- and the second line will cause a “Bad File Name” error. Hugh Eagle.
- 4.9
- • PC emulator with an ARM3 − The default boot-up process for the ARM3
- performs an RMClear command, killing all RAM resident modules including,
- in particular, the module that drives the ARM3. So, in order, to get the
- PC emulator to take advantage of the ARM3‘s extra speed you need to
- alter the line in !PC.Genboot.!Config immediately after the one that
- reads “Perform RMClear?” from “Y” to “N”! (Thanks to Martin Coulson of
- Atomwide for this advice.) Hugh Eagle
- 4.9
- • Printer tips − You can alter the halftone density by editing the
- PrData file within your printer driver (see Archive 4.6 for an example
- of how to find this). For instance, PrinterLJ has lines such as:
- 4.9
- pxres_halftone:300/8
- 4.9
- pyres_halftone:300/8
- 4.9
- so each halftone dot is actually formed of a matrix of 8x8 dots, giving
- a halftone density of 300/8=37.5 dpi. This gives a very coarse effect
- but can produce 65 different grey levels. Altering the lines to:
- 4.9
- pxres_halftone:300/6
- 4.9
- pyres_halftone:300/6
- 4.9
- gives “only” 37 grey levels and a dot pitch of 50 dpi. Experiment to see
- what suits your printer best.
- 4.9
- A word of caution. I used !Draw to produce some PCB artwork, printed it
- out using !PrinterLJ on a DeskJet Plus and sent it off... Disaster! The
- size was OK across the width but was 1.5% too small along the length of
- the paper, as was discovered when the finished circuit boards came back.
- I’d previously had no trouble using an Epson-compatible printer, so it
- may be something to do with the friction feed on the HP slipping, or
- perhaps a slightly thicker paper would have helped. Anyway, if your hard
- copy must be accurate, then check it! Jonathan Oakley, Cambridge.
- 4.9
- • Printing * command output − Ever since I got my LaserDirect I have
- been laboriously printing the results of *Status, *Dump, etc. by
- directing the output to a file and then printing the file (while
- bemoaning the loss of the <Ctrl-B>, etc. facility à la BBC). However, I
- have just realised that it is easier (and much more in keeping with
- Acorn’s RISC-OS standards, I am sure) to open a Task Window in !Edit,
- enter the * command (which puts its output in the window) and then print
- the contents of the window by “saving” to the printer driver icon. In
- other words, click <menu> on the !Edit icon on the icon bar and use
- Create − New Task window. This presents you with a new window with a *
- ready for a command. Type in the command whose output you want listing,
- say, *STATUS. When the listing has finished, click on the window with
- <menu> and go Edit − Save and drop the text file produced onto your
- printer icon. Easy! (Then close the window, answering ‘Yes’ to ‘Kill and
- close’.) Hugh Eagle
- 4.9
- • Printing via a RISC-OS printer driver from a BASIC program − Have you
- ever wondered why your computer has a button called “Print” that doesn’t
- seem to do anything of the sort?
- 4.9
- At last, applications seem to be appearing that recognise that pressing
- the <Print> key is rather an intuitive way of printing (Impression and
- Poster are two examples). Also, I have discovered that RISC-OS printer
- drivers are not nearly as fearsome as the PRM makes them seem and it is
- actually quite easy to incorporate into your own program’s printing
- routines which are activated by ... wait for it ... the <Print> key.
- Amazing!
- 4.9
- Take the Painting application from the original Arthurian Welcome disc,
- for instance. We still use this in my family because it is so simple,
- but it has always (incredibly) lacked a printing facility. To rectify
- this, proceed as follows:
- 4.9
- Put this line near the beginning of the program (e.g. immediately after
- PROCdesktop (at about line 200):
- 4.9
- PROCPrintSetup(110000)
- 4.9
- Note: 110,000 bytes is big enough to allow the program to run in mode
- 20. 55,000 would be enough for mode 12.
- 4.9
- Put this line in the WimpPoll loop (e.g. immediately after the ENDCASE
- statement at around line 400):
- 4.9
- IF INKEY-33 THEN PROCPrint(162,232,1274,972)
- 4.9
- Note: INKEY-33 is the crucial function that recognises whether the
- <Print> key is being pressed.
- 4.9
- Finally, put these procedures at the end of the program:
- 4.9
- DEF PROCPrintSetup(SpriteAreaSize%)
- 4.9
- DIM SpriteArea% SpriteAreaSize%
- 4.9
- !SpriteArea%=SpriteAreaSize%
- 4.9
- SpriteArea%!8=16
- 4.9
- SYS “OS_SpriteOp”,9+256,SpriteArea%
- 4.9
- ENDPROC
- 4.9
-
- 4.9
- DEF PROCPrint(X1%,Y1%,X2%,Y2%)
- 4.9
- SYS “Hourglass_On”
- 4.9
- PrintHandle%=OPENOUT(“printer:”)
- 4.9
- SYS “PDriver_SelectJob”,PrintHandle% ,0 TO Old%
- 4.9
- ON ERROR LOCAL PROCPrintError
- 4.9
-
- 4.9
- MOVE X1%,Y1%:MOVE X2%,Y2%
- 4.9
- SYS “OS_SpriteOp”,14+256, SpriteArea%,“TempSprite”,1 : REM Get sprite
- 4.9
-
- 4.9
- DIM RectBlock% 15,Transform% 15,PrintPosition% 7
- 4.9
- RectID%=1
- 4.9
- BackCol%=&FFFFFF00:REM set background colour to white
- 4.9
-
- 4.9
- REM X1%, Y1%, etc. are the screen coordinates of the area
- 4.9
- to be printed
- 4.9
- !RectBlock%=X1%:RectBlock%!4=Y1%
- 4.9
- RectBlock%!8=X2%:RectBlock%!12=Y2%
- 4.9
-
- 4.9
- REM No scaling or rotation required
- 4.9
- !Transform%=&10000:Transform%!4=0
- 4.9
- Transform%!8=0:Transform%!12=&10000
- 4.9
-
- 4.9
- REM Put the bottom LH corner 1.5“ REM from the left AND 5” from the
- 4.9
- REM bottom of the page
- 4.9
- !PrintPosition%=1.5*72000
- 4.9
- PrintPosition%!4=5*72000
- 4.9
-
- 4.9
- SYS “PDriver_GiveRectangle”,RectID%, RectBlock%,Transform%,
- PrintPosition%,BackCol%
- 4.9
- SYS “PDriver_DrawPage”,1,RectBlock%, 0,0 TO More%,,RectID%
- 4.9
- WHILE More%
- 4.9
- SYS “OS_SpriteOp”,34+256
- 4.9
- ,SpriteArea%,“TempSprite”
- 4.9
- ,X1%,Y1%,0
- 4.9
- SYS “PDriver_GetRectangle”,, RectBlock% TO More%,,RectID%
- 4.9
- ENDWHILE
- 4.9
- SYS “PDriver_EndJob”,PrintHandle%
- 4.9
- SYS “Hourglass_Smash”
- 4.9
- CLOSE#(PrintHandle%)
- 4.9
- ENDPROC
- 4.9
-
- 4.9
- DEF PROCPrintError
- 4.9
- SYS “PDriver_Abort”,PrintHandle%
- 4.9
- SYS “Hourglass_Smash”
- 4.9
- CLOSE#(PrintHandle%)
- 4.9
- ENDPROC
- 4.9
- Hugh Eagle
- 4.9
- • Running one application from inside another If you’ve ever been
- puzzled by odd behaviour when you try to run one application from inside
- another, the following advice from Mark Neves of Computer Concepts’
- Technical Support Department may help.
- 4.9
- My particular problem arose when I tried to make sure that a printer
- driver was loaded by running !PrinterXX from within application A’s !Run
- file. The result was that application A failed to run and when I quit
- !PrinterXX, an error was reported.
- 4.9
- The answer is that when you run a “sibling task” from another appli
- cation’s run file the sibling “takes over the current environment” until
- it terminates and only then does it return control to the parent task
- (in a manner analogous to a subroutine call).
- 4.9
- The solution is to use the command
- 4.9
- * Desktop <sibling task name>
- 4.9
- rather than *Run. Hugh Eagle
- 4.9
- • “Saving” data from one application to another − (This is another of
- those “obvious to those who know it” hints.) If you want to transfer
- data (e.g. text or a sprite or a drawn object) from one RISC-OS
- application to another you don’t have to save it on a disc from
- application A and then load it into application B; all you have to do is
- drag the icon from application A’s “Save” box (i.e. the window that
- appears when you choose a Save menu option) into application B’s window.
- 4.9
- This works with all well behaved (“RISC-OS compliant”) applications,
- e.g. !Edit, !Draw, Impression, !Paint, !Poster, etc. and generally works
- for either the whole contents of a window or for selected items. Hugh
- Eagle
- 4.9
- • Sprite plotting and colour translation − The ColourTrans section of
- the PRM (pages 1399 to 1424) includes references to a number of SWI’s
- (including, in particular, ColourTrans_SelectTable) which have to be
- called with R1 pointing to the “source palette”. Since, according to PRM
- pages 390−391, a sprite’s palette data starts 44 bytes after the
- beginning of the sprite, it seems clear that, in order to translate a
- sprite’s palette you simply call the ColourTrans SWI with
- SpritePointer%+44 in R1, doesn’t it? Wrong!!!
- 4.9
- In fact, the palette data in a sprite appears to include 8 bytes for
- each colour with the second 4 bytes duplicating the first 4 (does anyone
- know why this is?) whereas ColourTrans expects only 4 bytes per colour.
- 4.9
- So, before you can translate a sprite’s colours, you need to include
- some code on the following lines:−
- 4.9
- PaletteLength%=SpritePointer%!32−44
- 4.9
- IF PaletteLength%=0 THEN
- 4.9
- PalettePointer%=0
- 4.9
- ELSE
- 4.9
- FOR I%=0 TO PaletteLength%-8 STEP 8
- 4.9
- Palette%!(I%/2) = SpritePointer%!(I%+44)
- 4.9
- NEXT
- 4.9
- PalettePointer%=Palette%
- 4.9
- ENDIF
- 4.9
- Note: The palette data, if any, starts 44 bytes after the beginning of
- the sprite. SpritePointer%!32 contains the number of bytes from the
- beginning of the sprite to the start of the actual sprite pixel data. If
- this equals 44, there is no palette.
- 4.9
- The point of setting PalettePointer% to 0 if there is no palette data,
- is that if the sprite has no palette then, in many cases, (especially if
- the sprite is defined in a 256 colour mode) it makes sense to call
- ColourTrans with R1 set to 0 since ColourTrans will then translate the
- default palette for the sprite’s mode. However ...
- 4.9
- • Strange sprite colours − Ever since RISC-OS arrived, I’ve been puzzled
- by the odd colours which have appeared when some sprites have been
- plotted by various applications (including Impression, no less). I think
- that, at last, I’m beginning to understand why. Consider the following
- curious state of affairs:
- 4.9
- Palette details are an optional part of the sprite data format. A lot of
- sprites are created by !Paint. !Paint, by default, creates sprites
- without a palette (presumably on the assumption that, having been
- designed in the Desktop colour scheme, they will be used on the
- Desktop.)
- 4.9
- The PRM (page 1278) recommends that you should use the ColourTrans
- module for best results when plotting or printing a sprite. However,
- although ColourTrans knows how to translate from any given palette and
- from the default palette for any mode, it doesn’t seem to be equipped
- with any means of translating the standard desktop palette of a mode
- other than the current one.
- 4.9
- Therefore, the best that applications can do when faced with a palette-
- less sprite is to tell ColourTrans to assume that the sprite was defined
- in the default palette for its mode. The trouble with this is that it is
- about the worst possible thing that can be done with a sprite defined to
- be used on the Desktop since, for instance, colour 0 which is intended
- to be white, will be translated by ColourTrans, working from the default
- palette, into black! For example, even Impression reverses the colours
- of its standard document icon.
- 4.9
- So, what’s to be done? As far as I can tell:
- 4.9
- The best advice is to make sure that every sprite has a palette. If this
- isn’t possible then, for plotting sprites on the Desktop, use
- Wimp_ReadPixTrans if a sprite doesn’t have a palette (this is the
- routine that the Wimp manager uses for plotting sprites as icons and
- seems to produce quite acceptable results on the whole) and save
- ColourTrans calls for sprites that do have palettes. For example, follow
- the above palette conversion routine with code something like this:
- 4.9
- SYS “ColourTrans_SelectTable”,Mode%, PalettePointer%,-1,-1,ColTable%
- 4.9
- IF PaletteLength%<>0 THEN
- 4.9
- SYS “OS_SpriteOp”,52+512,Sprites% ,SpritePointer%,200,200,
- Mask%*8,Scale%,ColTable%
- 4.9
- ELSE
- 4.9
- IF NumberOfColoursInSprite%<63 THEN SYS “Wimp_ReadPixTrans”, 512,
- Sprites%,SpritePointer% ,,,,,ColTable%
- 4.9
- SYS “OS_SpriteOp”,52+512,Sprites%, SpritePointer%,200,200,
- 4.9
- Mask%*8,Scale%,ColTable%
- 4.9
- ENDIF
- 4.9
- If you’re plotting to a printer, “Wimp_ReadPixTrans” doesn’t help and I
- don’t think there is any straightforward, foolproof method. (It would be
- possible, I think, to create a block of palette data with the RGB values
- for the colours of the Desktop palette in the relevant mode and then
- feed this into ColourTrans, but this would be a rather tedious process.)
- Hugh Eagle
- 4.9
- Impression Hints and Tips
- 4.9
- • Adding fonts by using search & replace − As a mathematics and physics
- teacher, I use a lot of Greek letters and it is rather bothersome to
- have to work through all those menus to reach the effect “Greek” every
- time. Therefore, I use search & replace in a way which (at least in the
- Impression Junior handbook) is not documented:
- 4.9
- I type the text, using the Latin equivalents of the Greek letters (“g-
- Quant” instead of “g-Quant”) then, when I have finished the text, I use
- the following:
- 4.9
- Find: g-Quant
- 4.9
- Replace: g-Quant
- 4.9
- Impression does the rest. (Many thanks to Computer Concepts for the
- information!)
- 4.9
- By the way, if you wish to find out how all the other effects are saved
- in an Impression document, there is an easy way to find out: Just take a
- document with lots of effects and save only the text story (“with
- effects”). If you then drag the icon of the saved text story onto the
- !Edit icon, the text will appear with all the effects in plain language.
- Jochen Konietzko, Koeln, Germany
- 4.9
- (Wouldn’t it be easier to use <ctrl-F6> and edit the “Greek” style, go
- down to the bottom where it says “Key short-cut”, click in the box and
- press, say, <ctrl-shift-F9>, then OK it? Then when you want, say, “g-
- Quant”, you type “<ctrl-shift-F9>g<ctrl-shift-F9>-Quant”.... Oh, I see,
- Impression Junior doesn’t have styles. Oh well, nice try!)
- 4.9
- • Cutting invisible text − If you have more text in a frame than will
- fit, you get the little red arrow which indicates that some of the text
- is invisible. You could obviously create a new frame, click on the over-
- full frame and then click <adjust> on the new frame but there may still
- be too much for that frame. So, is there any way of marking the
- invisible text so that you can cut it or copy it? The answer is that you
- simply use <ctrl-down> to move the cursor to the (invisible) bottom of
- the text the click <adjust> to indicate the upper limit of the area to
- be marked. Ed.
- 4.9
- • Handy hint − If you use the ‘hand’ to move up or down through a long
- document, you are not limited in your movements to the visible page. In
- other words, if you keep moving the mouse up and up (by repeatedly
- lifting the mouse off the table) or down and down, you just keep moving
- through the document in the desired direction. (This is particularly
- useful if you are a trackerball user!) Ed.
- 4.9
- • Importing text files into Impression − In the new version of Impres
- sion which CC have just sent me (version 2.11), I have discovered an
- exciting new concept in the Archimedes world − “the Return Stripper”!!
- 4.9
- In the Extensions directory is a new loader module called “LoadReturn”
- which at last seems to deal satisfactorily with the importing of text
- files. Using this, I no longer have to load the file into !Edit then
- change linefeeds into carriage returns before importing. Nor do I have
- to suffer fixed line lengths in the imported text.
- 4.9
- However, I do have two quibbles (some people are never satisfied!):
- 4.9
- Double carriage returns are reduced to single returns, so spaces between
- paragraphs are eliminated (unless you change the style so that it leaves
- such a space − which I think is good practice. Ed). I feel it would be
- helpful to be able to set a “preference” to decide whether or not double
- returns are preserved.
- 4.9
- Importing a text file now involves a somewhat tiresome sequence of
- message windows whereby I am asked to accept or reject each of the
- available loader modules in turn. I feel it would be helpful to be able
- to use the “preference” facility either to define which loader is used
- for which filetype or, at the very least, to determine the order in
- which the various loader options are offered to me. Hugh Eagle.
- 4.9
- (All I did was to put the LoadReturn extension into the Auto directory
- in the Impression directory and now when I want files stripping, I use
- !Settype (Shareware 19 or 23) to change them to Acorn data file type
- (&FFD) and they are stripped automatically. Ed.)
- 4.9
- • Labels & Tickets − Another way of doing tickets and labels is to
- define a new master page which is the right size for what you want to
- create (pretty radical, eh?). “Fit lots” still works, giving you
- multiple tickets per sheet, but you’re not restricted to 1% size
- increments which can cause you to miss the boundaries on sticky labels,
- especially where there are three or four across the page width.
- (Brilliant! Why didn’t I think of that? Ed. − see below.)
- 4.9
- A similar technique works for cassette inlays. One way is to define a
- single master page 101mm deep and 288mm wide, divided into columns of
- 16, 12, 65, 65, 65 and 65mm; this format will fit two inlays to an A4
- page (assuming zero border width, which will vary between printers), but
- you need to fiddle around with !FontDraw and !Draw (Or use Draw1½ − see
- below. Ed) to get text on the spine of the cassette. Starting with a
- page 288mm deep and 101mm wide gives you the spine text a sensible way
- round, but the four “body” pages are then landscape, which you may not
- want.
- 4.9
- Another way is to split the inlay into two chapters; the spine has a
- 101mm wide, 28mm high master page, and the body pages are 65mm by 101mm,
- or vice versa if you want landscape. Then you need to do a bit of
- cutting and pasting by hand, as Impression won’t print individual pages
- sideways. This is the technique I ended up by using, printing at 141%
- then reducing the pasted-up result from two up on A3 back down by 70% to
- A4, thus enhancing the graphics halftones from 37.5 dpi to 53.6 dpi.
- I’ve included an example ... (Which we have put on the Monthly Program
- Disc. Ed) Jonathan Oakley, Cambridge.
- 4.9
- • Labels & tickets − Ed’s version − I have played a bit with Jonathan’s
- ideas and developed them a little. I tried to create some labels (like
- the ones on our Shareware Discs etc which come as 24 to an A4 page) and
- found that his method worked very well. I created a master page that was
- 70mm x 37.125mm (which is 210mm divided by 3 horizontally and 297mm
- divided by 8 vertically). I set a border 3mm wide on all four sides
- because the Laser Direct HiRes can print up to about 2.5mm of the edge
- of the page and I wanted to have a simple line border around my labels.
- I put all my text on the master page including a page number so that I
- could have a serial number on the labels. I then closed the master page
- and created another 23 pages for my document by using <menu> Edit −
- Insert new page. I clicked 22 times with <adjust> so that the menu
- stayed on screen and once with <select>. I then pressed <print> and
- clicked on “Fit lots” and then “Setup...” and then “Ignore page border”.
- The printout which appeared was almost right but was 1mm too far to the
- right, 1mm too low at the top and the last label was even lower. (Thinks
- hard.... tries various things and then....) The printout was slightly
- too long so I created a slightly shorter master page − 70mm x 37.11mm. I
- tried to see if there was any adjustment on the laser printer but
- couldn’t find any so I went to the (new, shorter) master page, clicked
- on the frame and pressed <ctrl-F10> to alter the frame. In the position
- section, I simply increased X from 5 to 6 and reduced Y from 5 to 4 in
- order to move the text on the page 1 mm right and 1 mm up. Bingo! Every
- border on every label was almost exactly 5mm.
- 4.9
- I also had a quick try with Jonathan’s cassette inlay printing and it is
- really very easy with his first method − I cheated though by using
- Draw1½ (Shareware 34). For the spine, all you do is create a new Draw1½
- document, type in the text you want, change it to whatever font you are
- using, press <menu> − Special − Text to path and then <menu> − Save −
- Selection and drop the Draw file produced into the relevant graphics
- frame in your Impression document. Then use <adjust> to drag the picture
- round until it is near enough at right angles to the rest of the text
- (having decided which way you want it to face) and finally press <ctrl-
- F11> (Alter graphic) and set the Angle to exactly 90° or 270°. (If you
- can remember which way round 90° or 270° puts it, then there’s no need
- to swing it round with <adjust>.) Here is a bit of text that I have just
- inserted. It must have taken me all of 45 seconds to create the frame,
- type in the text, convert it and add it in! (Software to enable me to do
- that on the Mac cost me hundreds of pounds a couple of years ago!)
- 4.9
- • “Running” an Impression document − In Alan Highet’s review of !Menon
- on Shareware 38 (Archive 4.8 page 48) he mentions that it did not work
- well with Impression documents since an attempt to “run” one of these
- caused a second copy of Impression to appear on the icon bar.
- 4.9
- I have observed a similar phenomenon in trying to create a front-end for
- Impression which, amongst other things, opens a template document chosen
- by the user. Simply *Running the document results in the loading of a
- new copy of Impression regardless of whether one is already running.
- 4.9
- So, why is it that double-clicking on an Impression document in a Filer
- window will load it into an existing copy of Impression whereas
- “running” it doesn’t?
- 4.9
- Mark Neves of Computer Concepts’ Technical Support Department has kindly
- explained why this happens and has pointed to a solution.
- 4.9
- The reason is that what happens when you double click on an icon in a
- Filer window is not simply that the document is “run”. First, the Filer
- broadcasts a Message_DataOpen message inviting other applications to
- open the document, and only if this message is returned unacknowledged
- does it instigate a *Run.
- 4.9
- The solution is a fairly simple program on the following lines:
- 4.9
- REM >!RunImage
- 4.9
- TaskName$=“RunImpDoc”
- 4.9
- :
- 4.9
- PROCSetUpWimp
- 4.9
- DocToOpen$=FNReadOSVarVal
- 4.9
- (“Doc$ToOpen”)
- 4.9
- PROCPollLoop
- 4.9
- SYS “Wimp_CloseDown”,Taskid% ,&4B534154
- 4.9
- IF NotAcknowledged% THEN OSCLI(“Run ”+DocToOpen$)
- 4.9
- END
- 4.9
- :
- 4.9
- DEF PROCPollLoop
- 4.9
- LOCAL mask%,quit%
- 4.9
- NotAcknowledged%=FALSE
- 4.9
- PROCSendDataOpenMessage
- 4.9
- mask%=0
- 4.9
- quit%=FALSE
- 4.9
- REPEAT
- 4.9
- SYS “Wimp_Poll”,mask%,block% TO reason%
- 4.9
- CASE reason% OF
- 4.9
- WHEN 17,18 : IF block%!16=4 THEN quit%=TRUE
- 4.9
- REM Another task (presumably
- 4.9
- REM Impression) has acknowledged
- 4.9
- REM our request to load a file.
- 4.9
- WHEN 19 : NotAcknowledged%=TRUE:quit%=TRUE
- 4.9
- REM Our request has not been acknowledged.
- 4.9
- ENDCASE
- 4.9
- UNTIL quit%
- 4.9
- ENDPROC
- 4.9
- :
- 4.9
- DEF PROCSendDataOpenMessage
- 4.9
- !block%=256
- 4.9
- block%!12=0:block%!16=5:block%!20=0
- 4.9
- block%!28=0:block%!32=0:block%!36=0
- 4.9
- block%!40=&2000
- 4.9
- $(block%+44)=DocToOpen$
- 4.9
- ?(block%+44+LEN(DocToOpen$))=0
- 4.9
- SYS “Wimp_SendMessage”,18,block%,0
- 4.9
- ENDPROC
- 4.9
- :
- 4.9
- DEF PROCSetUpWimp
- 4.9
- DIM block% &1000,errblk% 256
- 4.9
- REM Taskid%=FNWimpInit(200,TaskName$)
- 4.9
- SYS “Wimp_Initialise”,200, &4B534154,TaskName$ TO Version%,Taskid%
- 4.9
- ON ERROR PROCError(TaskName$)
- 4.9
- ENDPROC
- 4.9
- :
- 4.9
- DEF FNReadOSVarVal(varname$)
- 4.9
- LOCAL temp1%,temp2%,length%
- 4.9
- DIM temp1% 100,temp2% 100
- 4.9
- $temp2%=varname$
- 4.9
- SYS “OS_ReadVarVal”,temp2%,temp1%, 100,0,3 TO ,,length%
- 4.9
- temp1%?length%=13
- 4.9
- var$=$temp1%
- 4.9
- =var$
- 4.9
- :
- 4.9
- DEF PROCError(TaskName$)
- 4.9
- !errblk%=ERR
- 4.9
- $(errblk%+4)=REPORT$+“ at line ”+ STR$ERL
- 4.9
- errblk%?(4+LEN$(errblk%+4))=0
- 4.9
- SYS “Wimp_ReportError”,errblk%,1, TaskName$
- 4.9
- SYS “Wimp_CloseDown”,Taskid%, &4B534154:END
- 4.9
- ENDPROC
- 4.9
- To use this program, simply set up the OS variable Doc$ToOpen with the
- full pathname of the document and run the program. Hugh Eagle
- 4.9
- • Setting a style in an Impression frame − Question: how do I set up a
- blank frame containing a predetermined style (for instance, to hold the
- address of the person I am writing to, where I would like to use a
- different font from the one in the body of the letter)? If I put the
- cursor in the frame, then apply the style, then move the cursor
- elsewhere (or save and reload the document) before bringing it back to
- the address frame, and then start typing, the text comes up in the
- Basestyle.
- 4.9
- Answer: If after applying the style, I type anything (for instance a
- couple of carriage returns) in the address frame then the applied style
- seems to be remembered and the address frame works as intended.
- 4.9
- Caution: if I delete the entire contents of the frame the applied style
- is deleted too. So, if I want to blank the frame for reuse I have to
- remember to leave a carriage return or two to preserve the style. Hugh
- Eagle.
- 4.9
- • Typesetting − We said we would try to find companies willing to do
- typesetting from Impression output. Here are two that we have found. If
- you discover others, ask them to send us details of their services and
- we will publish them. We are particularly interested in those that will
- take Impression files as such rather than PostScript files on MS-DOS
- discs.
- 4.9
- The Type Station in Cardiff offers a full bureau service for bromide or
- film. You create PostScript files and either send them by post on an MS-
- DOS disc or send them c/o BT using a modem. For details, contact Elgan
- Davis on 0222−229977.
- 4.9
- Focus Print in Aberdeen can do bromides (PMT’s) from your Impression
- files. Phone Alexander Bisset on 0224−592571 ext 211 (or 0224−593956
- evenings). A
- 4.9
-
- 4.9
-
-
-
-